//
//  MainViews.h
//  MobileZIPCodes
//
//  Created by Andreas Schwelling on 23.11.07.
//	http://www.andi.de/zipcodes/
// 
//  Released under the GNU General Public License.
//  See LICENSE for details.
//
//  Use at your own risk.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UITransitionView.h>
#import <UIKit/UIPreferencesTable.h>
#import <UIKit/UISegmentedControl.h>
#import <UIKit/UISwitchControl.h>
#import <UIKit/UIPreferencesTextTableCell.h>
#import <UIKit/UIButtonBar.h>
#import <WebCore/WebFontCache.h>

#import "BrowseView.h"
#import "SearchView.h"
#import "PreferencesView.h"
#import "AboutView.h"
#import "FavouritesView.h"

@interface MainView : UIView {
	
	
	UITransitionView	*_transitionView;
	UIView				*_activeView;
	BrowseView			*_browseView;
	SearchView			*_searchView;
	PreferencesView		*_prefView;
	AboutView			*_aboutView;
	FavouritesView		*_favView;
	UIButtonBar			*_buttonBar;
	CGRect				_rect;
	int					currentView;
	
	BOOL				_performUpdate;
	
	DataManager			*_dm;
}

- (id)initWithFrame:(CGRect)frame;
- (void)dealloc;
- (BOOL) getPerformUpdate;
- (NSArray *)buttonBarItems;
- (void) reloadBrowseAndSearch;
- (void)buttonBarItemTapped:(id) sender;
-(UIButtonBar*)getButtonBar;
- (void)alertSheet:(UIAlertSheet *)sheet buttonClicked:(int)button;


#define CUR_BROWSER	0x00
#define CUR_SEARCH	0x01
#define CUR_FAV	0x02
#define CUR_PREF 0x03
#define CUR_ABOUT 0x04


extern NSString *kUIButtonBarButtonAction;
extern NSString *kUIButtonBarButtonInfo;
extern NSString *kUIButtonBarButtonInfoOffset;
extern NSString *kUIButtonBarButtonSelectedInfo;
extern NSString *kUIButtonBarButtonStyle;
extern NSString *kUIButtonBarButtonTag;
extern NSString *kUIButtonBarButtonTarget;
extern NSString *kUIButtonBarButtonTitle;
extern NSString *kUIButtonBarButtonTitleVerticalHeight;
extern NSString *kUIButtonBarButtonTitleWidth;
extern NSString *kUIButtonBarButtonType;

@end
